Controller of electric power steering apparatus

ABSTRACT

An initial abnormality analysis data is reliably retained by a controller of an electric power steering apparatus. The controller of the electric power steering apparatus is constituted by comprising abnormality detection means for detecting the abnormality of a steering assist control mechanism comprising an electric motor giving a steering assist force to a steering system and abnormality data storage means for storing abnormality analysis data in storage means when the abnormality of the steering assist control mechanism is detected by this abnormality detection means, wherein the storage means comprises a plurality of overwrite prohibition storage areas for prohibiting the overwrite of the abnormality analysis data and a plurality of overwrite allowable storage areas for overwriting and storing the abnormality analysis data, and wherein the abnormality data storage means stores the abnormality of the steering assist control mechanism detected by the abnormality detection means in the overwrite prohibition storage area when the abnormality is a first abnormality analysis data, and stores the abnormality in the overwrite allowable storage area when the abnormality is the abnormality analysis data subsequent to the second time.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to controller of an electric powersteering apparatus comprising a steering assist control mechanism havingan electric motor giving a steering assist force to a steering system,abnormality detection means for detecting an abnormality of thissteering assist control mechanism, and abnormality data storage meansfor storing the abnormality analysis data in the storage means when theabnormality of the steering assist control mechanism is detected by thisabnormality detection means.

2. Description of the Prior Art

In general, as a controller of the conventional electric power steeringapparatus, for example, there has been known an electric power steeringtorque sensor, which is constituted by data detection means fordetecting, for example, data usable for failure analysis of a torquesensor and temporary storage means for temporarily storing data detectedby the data detection means, wherein data when a steering assist forcecommand from among data stored in the temporary storage means exceeds arated value, that is, data only when a handle operation by a driver isactually performed is written in a backup memory, thereby to excludeunnecessary data when analyzing a failure, and useful data only isretained so as to save a capacity of the backup memory, and further, thebackup memory is constituted by an overwrite memory and an archivalnonvolatile memory, and in case the size of data stored in the temporarystorage means exceeds a setting range, that is, if and only when thereis a high possibility of some abnormality being generated, data isadditionally retained in the archival nonvolatile memory (for example,see JP2000-337977A).

However, in the conventional example disclosed in the aforementionedPatent Document 1, though analysis data is stored in the archivalnonvolatile memory if and only when there is a high possibility of somekind of abnormality being generated, in case the data exceeds aretainable number of pieces of the archival nonvolatile memory, anoverwrite is made in the archival nonvolatile memory, and this causes anunsolved problem of initial analysis data being erased.

That is, in case a user makes a request for repair to a dealer or arepair plant after finding out the failure of a torque sensor, when theabnormality exceeds a retainable number of times of the archival memoryincluding the time during the repairing operation, the initial analysisdata is overwritten so that the initial abnormality data necessary foranalysis is lost to cause an unsolved problem, thereby becoming anobstacle to the abnormality analysis.

Hence, the present invention has been carried out aiming at the unsolvedproblem of the foregoing conventional example, and an object of theinvention is to provide a controller of an electric power steeringapparatus, which can reliably retain initial abnormality analysis datanecessary for failure analysis.

SUMMARY OF THE INVENTION

In order to achieve the object, the controller of the electric powersteering apparatus according to claim 1 is a controller of an electricpower steering apparatus characterized by comprising: a steering assistcontrol mechanism comprising an electric motor giving a steering assistforce to a steering system; abnormality detection means for detecting anabnormality of the steering assist control mechanism; and abnormalitydata storage means for storing the abnormality analysis data in storagemeans when the abnormality of the steering assist control mechanism isdetected by the abnormality detection means, wherein the storage meanscomprises: an overwrite prohibition storage area for prohibiting anoverwrite of the abnormality analysis data and an overwrite allowablestorage area for overwriting and storing the abnormality analysis data,and wherein, when the abnormality of the steering assist controlmechanism detected by the abnormality detection means is initialabnormality analysis data, abnormality data storage means stores theabnormality in the overwrite prohibition storage area, and when theabnormality is the abnormality analysis data subsequent to the initialabnormality analysis data, the abnormality data storage means stores theabnormality in the overwrite allowable storage area.

According to the invention according to claim 1, when the abnormality ofthe steering assist control mechanism is detected by the abnormalitydetection means, the abnormality data storage means determines whetheror not the abnormality is initial abnormality analysis data of thesteering assist control mechanism, and when the abnormality is theinitial abnormality analysis data, the abnormality is stored in theoverwrite prohibition storage area of the storage means, and when theabnormality is not the initial abnormality analysis data, theabnormality is stored in the overwrite allowable storage area of thestorage means, and therefore, the initial abnormality analysis data canbe reliably retained in the overwrite prohibition storage area, and themost recent initial abnormality analysis data can be stored in theoverwrite allowable storage area, and by reading the initial abnormalityanalysis data and the most recent abnormality analysis data stored inthe overwrite prohibition storage area and the overwrite allowablestorage area, the advantage of being able to perform an accurateabnormality analysis can be obtained.

Further, the controller of the electric power steering apparatusaccording to claim 2 in the invention according to claim 1 ischaracterized in that the storage means is constituted by anelectrically erasable read-only memory.

According to the invention according to claim 2, since the storage meansis constituted by an electrically erasable read-only memory, at thepoint of time when the abnormality analysis is terminated, the initialabnormality analysis data and the most recent abnormality analysis datastored in the overwrite prohibition storage area and the overwriteallowable storage area are totally erased, and this provides theadvantage of being able to store abnormality analysis data again.

Further, the controller of the electric power steering apparatusaccording to claim 3 in the invention according to claim 1 or 2 ischaracterized in that the abnormality data storage means is constitutedto have an initial data discriminating flag set when an initialabnormality analysis data is stored in the storage means, and store theabnormality analysis data as the initial abnormality analysis data inthe overwrite prohibition storage area in case the abnormality analysisdata is inputted when the initial data discriminating flag is reset, andstore the initial abnormality analysis data in the overwrite allowablestorage area as the abnormality analysis data subsequent to the initialabnormality analysis data when the initial data discriminating flag isset.

According to the invention according to claim 3, when the abnormalityanalysis data is inputted, it is determined whether or not theabnormality analysis data is the initial abnormality analysis datadepending on whether or not the initial data discriminating flag isreset, and when the abnormality analysis data is the initial abnormalityanalysis data, the abnormality analysis data is stored in the overwriteprohibition storage area, and when the abnormality analysis data is asubsequent abnormality analysis data, the abnormality analysis data isstored in the overwrite allowable storage area, and this provides theadvantage of being able to accurately store the initial abnormalityanalysis data in the overwrite prohibition storage area.

Furthermore, the controller of the electric power steering apparatusaccording to claim 4 in the invention according to claim 3 ischaracterized in that the abnormality data storage means comprises flagreset means for resetting the initial data discriminating flag when ananalysis processing of the abnormality analysis data is performed.

According to the invention according to claim 4, when the analyticprocessing of the abnormality analysis data is performed, the initialdata discriminating flag is reset by flag reset means, and this providesthe advantage of being able to make the storage of new initialabnormality analysis data possible again after the analytic processingof the abnormality analysis data.

Further, the controller of the electric power steering apparatusaccording to claim 5 in the invention according to any one of claims 1to 4 is characterized in that the storage means has a plurality ofoverwrite prohibition storage areas.

According to the invention according to claim 5, since the storage meanshas a plurality of overwrite prohibition storage areas, in case theabnormality analysis data initially stored is erroneously detected orthe abnormality different from the abnormality initially generated isgenerated, these abnormalities can be stored individually in a pluralityof overwrite prohibition storage areas, and in case multipleabnormalities are generated, it provides the advantage of being able toaccurately perform abnormality analysis.

Further, the controller of the electric power steering apparatusaccording to claim 6 is characterized by comprising: a steering assistcontrol mechanism comprising an electric motor giving a steering assistforce to a steering system; initial abnormality detection means fordetecting an abnormality at the operation starting time of the steeringassist control mechanism; full-time abnormality detection means fordetecting the abnormality in full time after the operation starting timeof the steering control mechanism; and abnormality data storage meansfor storing the abnormality analysis data for analyzing the abnormalityin the storage means when the abnormality is detected by the initialabnormality detection means and the full-time abnormality detectionmeans, wherein the storage means comprises initial abnormality andfull-time abnormality overwrite prohibition storage areas forprohibiting the overwrite of the abnormality analysis data and theinitial abnormality and full-time abnormality overwrite allowablestorage areas for overwriting and storing the abnormality analysis dataindividually corresponding to the initial abnormality detection meansand the full-time abnormality detection means, and wherein theabnormality data storage means is constituted to store an abnormality ofthe steering assist control mechanism detected by the initialabnormality detection means in the initial abnormality overwriteprohibition storage area when the abnormality is an initial abnormalityanalysis data, and store the abnormality in the initial abnormalityoverwrite allowable storage area when the abnormality is the initialabnormality analysis data subsequent to the second time, and store theabnormality in the full-time abnormality overwrite prohibition storagearea when the abnormality of the steering assist control mechanismdetected by the full-time abnormality detection means is an initialabnormality analysis data, and store the abnormality in the full-timeabnormality overwrite allowable storage area when the abnormality is thefull-time abnormality analysis data subsequent to the second time.

According to the invention according to claim 6, the abnormality at theoperation starting time of the steering assist control mechanism isdetected by the initial abnormality detection means, and the abnormalityafter the operation starting time of the steering assist controlmechanism is detected by the full-time abnormality detection means, andthe abnormalities detected by these initial abnormality detection meansand the full-time abnormality detection means can be stored individuallyin the initial abnormality overwrite prohibition storage area, theinitial abnormality overwrite allowable storage area, the full-timeabnormality overwrite prohibition storage area, and the full-timeabnormality overwrite allowable area, and the abnormality analysis dataat the abnormality detecting time by an initial diagnosis at theoperation starting time of the steering assist control mechanism and theabnormality analysis data at the abnormality detecting time by afull-time diagnosis after the operation starting time can beindividually stored, and this provides the advantage of being able toaccurately perform the abnormality analysis at the abnormalitygenerating time.

Furthermore, the controller of the electric power steering apparatusaccording to claim 7 in the invention according to any one of claims 1to 6 is characterized in that the abnormality data storage means isconstituted to retain the abnormality analysis data during apredetermined time before and after the abnormality detection in timesequence.

According to the invention according to claim 7, since the abnormalityanalysis data during a predetermined time before and after theabnormality is detected by the abnormality data storage means isretained in time sequence, this provides the advantage of being able toaccurately determine a development leading to the abnormality and astate after that from time sequential data.

Further, the controller of the electric power steering apparatusaccording to claim 8 in the invention according to claim 7 ischaracterized in that the abnormality analysis data is constituted bytime sequential data during the detection period composed of a firstpredetermined time leading to the generation of the abnormality and timesequential data during the confirmation period till the secondpredetermined time from the termination time of the detection period.

According to the invention according to claim 8, since the abnormalityanalysis data is constituted by time sequential data during thedetection period in a first predetermined time leading to the generationof the abnormality as time sequential data and time sequential dataduring the confirmation period from the detection period to a secondpredetermined time, this provides the advantage of being able toreliably analyze data change in the course of detecting the abnormality.

Further, the controller of the electric power steering apparatusaccording to claim 9 in the invention according to claim 6 or 7 ischaracterized in that the initial abnormality detection means isconstituted to perform any one or combination of the initial abnormalitydetection of torque detection means included in the steering assistcontrol mechanism, the initial abnormality detection of the controlmeans included in the steering assist control mechanism, the initialabnormality detection of current detection means included in thesteering assist control mechanism, the initial abnormality detection ofthe electric motor included in the steering assist control mechanism,the initial abnormality detection of the power supply system, and theinitial abnormality detection of the storage unit.

According to the invention according to claim 9, by the initialabnormality detection means as an initial abnormality detection mode,any one or a plurality of the initial abnormality detection of thetorque detection means included in the steering assist controlmechanism, the initial abnormality detection of the control meansincluded in the steering assist control mechanism, the initialabnormality detection of current detection means included in thesteering assist control mechanism, the initial abnormality detection ofthe electric motor included in the steering assist control mechanism,the initial abnormality detection of the power supply system, and theinitial abnormality detection of the storage unit are performed, andthis provides the advantages of being able to accurately detect theabnormality generated in the steering assist control mechanism at theoperation starting time.

Further, the controller of the electric power steering apparatusaccording to claim 10 in the invention according to any one of claim 6to 8 is characterized in that the full-time abnormality detection meansis constituted to perform any one or combination of the full-timeabnormality detection of torque detection means included in the steeringassist control mechanism, the full-time abnormality detection of thecontrol means included in the steering assist control mechanism, thefull-time abnormality detection of current detection means included inthe steering assist control mechanism, the full-time abnormalitydetection of the electric motor included in the steering assist controlmechanism, the full-time abnormality detection of speed detection meansincluded in the steering assist control mechanism, and the full-timeabnormality detection of the power supply system.

According to the invention according to claim 10, by the full-timeabnormality detection means as the full-time abnormality detection, thefull-time abnormality detection means performs any one or a plurality ofthe full-time abnormality detection of torque detection means includedin the steering assist control mechanism, the full-time abnormalitydetection of the control means included in the steering assist controlmechanism, the full-time abnormality detection of current detectionmeans included in the steering assist control mechanism, the full-timeabnormality detection of the electric motor included in the steeringassist control mechanism, the full-time abnormality detection of speeddetection means included in the steering assist control mechanism, andthe full-time abnormality detection of the power supply system, and thisprovide the advantage of being able to accurately detect the abnormalitygenerated in the steering assist control mechanism after the operationstarting time.

Further, the controller of the electric power steering apparatusaccording to claim 11 in the invention according to any one of claim 6to 10 is characterized by comprising data amount managing means formanaging the data amount initially stored in the initial abnormalityoverwrite prohibition storage area and the full-time abnormalityoverwrite prohibition storage area, and storage data adding means foradditionally storing new abnormality analysis data in the initialabnormality overwrite prohibition storage area and the full-timeabnormality overwrite prohibition storage area by determining whether ornot the abnormality analysis data is storable and if storable based onthe data amount managed by the data amount managing means when theabnormality analysis data is generated next.

According to the invention according to claim 11, the data amount of theabnormality analysis data stored in the initial and full-time overwriteprohibition storage areas is managed by data amount managing means, andwhen the data amount of the abnormality analysis data is few and theabnormality analysis data is generated next, in case this abnormalityanalysis data is storable in the overwrite prohibition area, newabnormality analysis data is additionally stored, and this provides theadvantage of being able to make an effective use of the storage capacityof the initial and full-time overwrite prohibition storage areas.

Furthermore, the controller of the electric power steering apparatusaccording to claim 12 in the invention according to claim 11 ischaracterized in that the data managing means is constituted to storeand manage the data amount stored in the initial abnormality overwriteprohibition storage area and the full-time abnormality overwriteprohibition storage area in a nonvolatile memory.

According to the invention according to claim 12, since the data amountmanaging means stores and manages the data amount stored in the initialabnormality and full-time abnormality overwrite prohibition storageareas in the nonvolatile memory, accurate data management can beperformed without vanishing the data amount.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram showing one embodiment of thepresent invention;

FIG. 2 is a characteristic line diagram of a torque detection signaldetected by a steering torque sensor;

FIG. 3 is a block diagram showing a specific structure of a controllerof FIG. 1;

FIG. 4 is an explanatory drawing showing a structure of EEPROM;

FIG. 5 is a flowchart showing one example of steering assist controlprocessing procedures executed by main and sub MCUs;

FIG. 6 is a characteristic line diagram showing a steering assistcommand value calculation map;

FIG. 7 is a flowchart showing one example of the abnormality detectionprocessing procedure executed by the main MCU;

FIG. 8 is a flowchart showing one example of an initial abnormalitydetection processing procedure;

FIG. 9 is a flowchart showing one example of a torque sensor abnormalitydetection storing processing procedure;

FIG. 10 is a flowchart showing one example of a full-time abnormalitydetection processing procedure;

FIG. 11 is another explanatory drawing showing a structure of EEPROM;

FIG. 12 is a flowchart showing one example of the data write managementprocessing procedure executed by the main MCU; and

FIG. 13 is a flowchart showing one example of the data transferprocessing procedure executed by the main MCU.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

An embodiment of the present invention will be described with referenceto the accompanying drawings.

FIG. 1 is a schematic block diagram showing one embodiment of thepresent invention. In the Figure, reference numeral 1 denotes a steeringwheel, and a steering force operated from a driver to this steeringwheel 1 is transmitted to a steering shaft 2 having an input shaft 2 aand an output shaft 2 b. This steering shaft 2 has one end of the inputshaft 2 a coupled to the steering wheel 1 and the other end coupled toone end of the output shaft 2 b through a steering torque sensor 3 as asteering torque detection means. Here, the steering torque sensor 3 isconstituted by a main torque sensor 3 m, a sub-torque sensor 3 s, and asensor voltage monitoring unit 3 w which monitors whether or not asensor voltage supplied to both of the torque sensors 3 m and 3 s isnormal and, when the sensor voltage is abnormal, a voltage abnormalitydetection signal SA of, for example, theoretical value “1” is outputted.

The steering force transmitted to the output shaft 2 b is transmitted toa lower shaft 5 through a universal joint 4, and is further transmittedto a pinion shaft 7 through a universal joint 6. The steering forcetransmitted to this pinion shaft 7 is transmitted to tie rods 9 througha steering gear 8, and allows an unillustrated steering wheel to besteered. Here, the steering gear 8 is constituted by a rack-and-pinionsystem which has a pinion 8 a coupled to the pinion shaft 7 and a rack 8b engaged with this pinion 8 a, and converts rotational motiontransmitted to the pinion 8 a into linear motion by the rack 8 b.

The output shaft 2 b of the steering shaft 2 is coupled with a steeringassist mechanism 10 which transmits steering assist force to the outputshaft 2 b. This steering assist mechanism 10 comprises a reduction gear11 coupled to the output shaft 2 b and an electric motor 13 as a motorcoupled to this reduction gear 11, the electric motor 13 generating asteering assist force.

The steering torque sensor 3 is given to the steering wheel 1, anddetects steering torque transmitted to the input shaft 2 a, and forexample, converts steering torque into torsion angular displacement ofan unillustrated torsion bar interposed between the input shaft 2 a andthe output shaft 2 b and detects this torsion angular displacement by apotentiometer. This torque sensor 3, as shown in FIG. 2, is constitutedsuch that when the inputted steering torque is zero, the sensor 3 has apredetermined neutral voltage V0, and when taking a turn to the rightfrom this state, the sensor 3 has an increased voltage from the neutralvoltage V0 according to the increase of the steering torque, and whenthe steering torque takes a turn to the left from the zero state, thesensor 3 has a voltage reduced from the neutral voltage V0 according tothe increase of the steering torque, thereby to output the torquedetection value T.

Torque detection values Tm and Ts outputted from this torque sensor 3are inputted to the controller 14. This controller 14 is provided with apower supply from a battery 15 through a key switch 16, and in additionto the torque detection values Tm and Ts, is inputted also with a speeddetection value V detected by a speed sensor 17 and a driving currentdetection value IND flowing in the electric motor 13. The controller 14calculates the steering assist command value IM*, which generates thetorque detection value Tm to be inputted and the steering assist forceaccording to the speed detection value V by the electric motor 13 andfeeds back and controls driving current to be supplied to the electricmotor 13 by the calculated steering assist command value IM* and themotor current detection value IMD.

The controller 14, as shown in FIG. 3, comprises a main and sub MCU(Micro Controller Unit) 101 and 102, which output a motor driving signalIr and a motor direction signal Ds by performing a predeterminedcalculation based on the torque detection values Tm and Ts and the speeddetection value V, a motor driving circuit 110 which drives the electricmotor 13 based on the motor driving signal Ir and the motor directionsignal Ds outputted from the main MCU 101, a relay 111 which isconnected to the key switch 16 and controls the provision of the powersupply to the motor driving circuit 110, a motor current detectioncircuit 112 for detecting the motor current IMD, a motor angular speedestimation circuit 113 for estimating a motor angular speed ω based on amotor current IMD and a motor terminal voltage VM supplied from themotor driving circuit 18 to the electric motor 13, and a temperaturesensor 114 for detecting temperatures in the vicinity of the main MCU101 and the sub MCU 102.

The main MCU 101 has a built-in self-monitoring watch dog timer (WDT)101 m for mutual monitoring and a built-in sub watch dog timer (WDT) 101s. The sub MCU 102 also has also a built-in self-monitoring watch dogtimer (WDT) 102 s for mutual monitoring and a built-in main watch dogtimer (WDT) 102 m. The sub MCU 102 determines that a main CPU 101 isabnormal due to runaway and the like when the main watch dog timer 102 mstops because time is up, and outputs a motor drive prohibition signalMp to the motor driving circuit 110 to stop the driving of the motor 13and outputs an off signal to the relay 111.

Although the main MCU 101 and the sub MCU 102 concurrently generate thetorque detection values Tm and Ts, the speed detection value V, thecurrent detection value IMD, and the motor driving signals IMM and IMSbased on the motor angular speed ω, the motor driving signal IMM onlyfrom the main MCU 101 is inputted to the motor driving circuit 110, andthe motor driving signal IMS calculated at the sub MCU 102 is used formonitoring. Hence, in the sub MCU 102, the motor driving signal IMScalculated by itself and the motor driving signal IMM calculated by themain MCU 101 are compared, and when the deviation of both signals iswithin a predetermined range, it is determined that the main MCU 101 isnormal, but when the deviation is outside the predetermined range, it isdetermined that the main MCU 101 is abnormal, so that the motor drivingprohibition signal Mp is outputted to the motor driving circuit 110, andat the same time, the sub MCU 102 outputs an off signal to the relay111.

Here, the main MCU 101, as shown in FIG. 3, is built-in with a ROM (readonly memory) 130 storing a steering assist control processing program,an abnormality detection processing program, and the like to be executedby both of the MCUs and a RAM (random access memory) 131 storingdetection data such as the torque detection value T, the motor currentdetection value IMD, the motor angular speed ω, and the like, datarequired in the process of the steering assist control processing andthe abnormality detection processing to be executed by the MCU, and theprocessing result. At the same time, the main MCU 101 is built-in atleast with an electrically erasable EEPROM 132 which stores abnormalityanalysis data at the abnormality detection time of the steering assistmechanism, and furthermore, is connected with an alarm device 133 forraising an alarm. Further, the sub MCU 102 is built-in at least with aROM 130 storing the steering assist control processing program and thelike, data required in the process of the steering assist controlprocessing and the like to be executed by the MCU, and a RAM 131 storingthe processing result.

Here, the EEPROM 132, as shown in FIG. 4, is constituted by overwriteprohibition EEPROMs 132 a 1 and 132 b 1 forming overwrite prohibitionstorage areas MA1 and MB1, which store the abnormality analysis data(the speed detection value V, the steering torque detection value T, andthe motor current detection value IMD) generated at the beginning in theinitial abnormality detection processing at the operation starting timeof the steering assist controller and in the full-time abnormalitydetection processing after starting operation of the steering assistcontroller since starting the abnormality detection processing like thefactory shipment time as the initial abnormality analysis data and thefull-time abnormality analysis data, and overwrite allowable EEPROMs 132a 2 and 132 b 2 forming overwrite allowable storage areas MA2 and MB2,which store the initial abnormality analysis data and the full-timeabnormality analysis data subsequent to the second time.

Further, the steering assist control processing executed by the main MCU101 and the sub MCU 102, as shown in FIG. 5, is as follows. First, atstep S1, the torque detection value Tm detected by the main torquesensor 3 m of the steering torque sensor 3 is read, and then, theprocessing proceeds to step S2, and calculates a steering torque Tr(=T−V0) by subtracting the neutral voltage V0 from the torque detectionvalue Tm. Next, the processing proceeds to step S3, and reads the speeddetection value V detected by the speed sensor 17, and then, proceeds tostep S4, and calculates the steering assist command value IM* whichbecomes a motor current command value by referring to a steering assistcommand value calculation map shown in FIG. 6 based on the steeringtorque Tr and the speed detection value V.

Here, the steering assist command value calculation map, as shown inFIG. 6, is constituted by a characteristic line diagram plotting thesteering torque detection value T in the axis of abscissa and plottingthe steering assist command value IM* in the axis of ordinate and takingthe speed detection value V as a parameter. In the diagram, there arefour characteristic lines formed, which are constituted by a straightline segment L1 extending in a relatively gentle inclination despite ofthe speed detection value V during the period when the steering torqueTs increases from “0” in the forward direction until reaching a firstsetting value Ts1, straight line segments L2 and L3 extending inrelative gentle inclinations in a state in which the speed detectionvalue V is relatively fast when the steering torque Ta increases upfurther than the first setting value Ts1, straight line segments L4 andL5 put in parallel with the axis of abscissa in the vicinity of thesecond setting value Ts in which the steering torque detection value Tsis larger than the first setting value Ts1, straight line segments L6and L7 having relatively sharp inclinations in a state in which thespeed detection value V is slow, straight line segments L8 and L9 havinginclinations sharper than the straight line segments L6 and L7, straightline segment L10 having an inclination shaper than the straight linesegment L8, and straight line segments L11 and L12 extending in parallelwith the axis of abscissa from the trailing ends of the straight linesegments L9 and L10. In case the steering torque Ts increases in anegative direction, the characteristic line diagram is similarlyconstituted to be formed by four characteristic lines which becomesymmetric with points by being sandwiched between the foregoing segmentsand the origin point.

Subsequently, the processing proceeds to step S5, and reads the motorangular speed ω presumed by a motor angular speed estimation circuit 20,and then, proceeds to step S6, and multiplies the motor angular speed ωby an inertial gain Ki, and excludes a torque to adjust motor inertiafrom the steering torque Tr, and calculates an inertia compensationvalue Ii (=Ki·ω) for inertia compensation control in order to obtain asteering sense with no inertial sense, and at the same time, multipliesthe absolute value of the steering assist command value IM* by frictionfactor gain Kf, thereby to calculate a friction compensation value If(=Kf·IM*) for friction compensation control, so that the steering forceis prevented from being affected by friction on a power transmissionunit or the electric motor. Here, reference numeral of the frictioncompensation value If is decided based on reference numeral of thesteering torque Tr and a steering direction signal to determine theoversteer and the understeer of the steering by using the steeringtorque Tr.

Subsequently, the processing proceeds to step S7 and performs adifferential operation processing of the steering torque Tr, andcalculates a center response improvement command value Ir to securestability in assist characteristic blind sector and execute compensationof static friction. Then, the processing proceeds to step S8, and addsthe calculated inertia compensation value Ii, the friction compensationvalue If, and the center response improvement command value Ir to thesteering assist command value IM*, thereby to calculate a steeringassist compensation command value IM*′ (=IM*+Ii+If+Ir). Subsequently,the processing proceeds to step S9, and differentiates the steeringassist compensation value IM*′, and calculates a differential value Idfor feed forward control.

Next, the processing proceeds to step S10, and reads a motor currentdetection value IMD, and then, proceeds to step S11, and subtracts themotor current detection value IMD from the steering assist compensationvalue IM*′to calculate a current deviation ΔI, and then, proceeds tostep S12, and performs a comparison calculation processing of thecurrent deviation ΔI to calculate a comparison value ΔIp for comparisoncompensation control, and then, proceeds to step S13, and performs anintegration calculation processing of the current deviation ΔI tocalculate an integrated value ΔIi for integration compensation control,and then, proceeds to step S14, and adds the differential value Id, thecomparison value ΔIp, and the integrated value ΔIi, thereby to calculatea motor driving current IMJ (j=M and S) (=Id+ΔIp+ΔIi), and after that,proceeds to step S15.

In this step S15, the motor driving current IM calculated at the stepS14 is outputted to the motor driving circuit 18, and then, theprocessing returns to the step S1.

Further, in the main MCU 101, the abnormality detection processing fordetecting the abnormality of the steering assist control mechanism shownin FIG. 7 is executed. This abnormality detection processing is executedand started, for example, when the key switch 16 is put into an on-stateand the power supply is inputted to the controller 14. First, at stepS31, the processing determines whether or not an ignition switch (notshown) is in an on-state, and when it is in an off-state, the processingdetermines that the steering assist controller is in a non-operatingstate, and waits until the ignition switch is put into an on-state, andwhen the ignition switch is in an on-state, proceeds to step S32, andafter activating the initial abnormality detection processing shown inFIG. 8, proceeds to step S33.

In this step S33, the processing determines whether or not the initialabnormality detection processing is completed, and when the initialabnormality detection processing is not completed, waits until thisprocessing is completed, and when the initial abnormality detectionprocessing is completed, proceeds to step S34.

In this step S34, after activating the full-time abnormality detectionprocessing shown in FIG. 10, the processing proceeds to step S35, anddetermines whether or not the ignition switch is in an off-state, andwhen the ignition switch continues to be in an on-state, waits untilthis switch is put into an off-state, and when the ignition switch isput into an off-state, the processing proceeds to step S36, and afterstopping the full-time abnormality detection processing, returns to thestep S31.

The initial abnormality detection processing is executed as a timerinterrupt processing for a predetermined time, for example, for every 2ms for a predetermined main program, and as shown in FIG. 8, first, atstep S41, by determining whether or not both writing and reading of theRAM 131 are verified to match, the processing determines whether or notthe RAM 131 is normal, and when the RAM 131 is abnormal, proceeds tostep S42, and determines whether or not an initial data discriminatingflag FTA stored in the normal ROM from among the EEPROMs 132 a 1 and 132b 2 showing whether or not first initial abnormality analysis data isstored in the overwrite prohibition storage area MA1 on the overwriteprohibition EEPROM 132 a 1 is set in “1”, which represents that thefirst initial abnormality analysis data is stored, and when the initialdata discriminating flag FTA is reset to “0”, the processing determinesthat the overwrite storage area MA1 is not stored with the first initialabnormality analysis data, and proceeds to step S43.

In this step S43, the processing writes a RAM abnormality commandshowing that the RAM 131 is abnormal in the overwrite prohibitionstorage area MA1, and then, proceeds to step S44, and sets the initialdata discriminating flag FTA stored in the normal ROM from among theEEPROMs 132 a 1 and 132 b 2 in “1”, and then, proceeds to the step S45,and determines whether or not the initial abnormality detectionprocessing time set in advance has elapsed, and when the initialabnormality detection processing time has not yet elapsed, terminatesthe timer interrupt processing and returns to the predetermined mainprogram, and when the initial abnormality detection processing time haselapsed, terminates the initial abnormality detection processing.

Further, when the determining result of step S42 shows that the initialdata discriminating flag FTA is set in “1”, the processing proceeds tostep S46, and after storing the RAM abnormality command showing that theRAM 131 is abnormal in the overwrite allowable storage area MA2 formedon the overwrite allowable EEPROM 132 a 2, proceeds to the step S45.

On the other hand, when the determining result of the step S41 showsthat the RAM 131 is normal, the processing proceeds to step S47, andperforms a sum check of the EEPROMs 132 a 1 to 132 b 2, and by detectingwhether or not they are not matched, determines whether or not theEEPROMs 132 a 1 to 132 b 2 are normal. When any of the EEPROMs 132 a 1to 132 b 2 is abnormal, the processing proceeds to step S48, anddetermines whether or not the initial data discriminating flag FTA isset in “1”, and if the flag is set to “0”, the processing proceeds tostep S49, and determines whether or not the abnormal EEPROM is theinitial abnormality overwrite prohibition EEPROM 132 a 1, and when theinitial abnormality overwrite prohibition EEPROM 132 a 1 is normal, theprocessing proceeds to step S50. After storing an EEPROM abnormalitycommand showing that either of the abnormal EEPROMs 132 a 2, 132 b 1,and 132 b 2 is abnormal in the initial abnormality overwrite prohibitionEEPROM 132 a 1, the processing proceeds to step S51, and sets theinitial data discriminating flag FTA in “1”, and after that, proceeds tothe step S45, and when the initial abnormality overwrite prohibitionEEPROM 132 a 1 is abnormal, proceeds to step S52, and after storing theEEPROM abnormality command showing that the initial abnormalityoverwrite prohibition EEPROM 132 a 1 is abnormal in the initialabnormality overwrite allowable EEPROM 132 a 2, proceeds to step S53,and outputs an abnormality alarm signal to an alarm circuit 133, andthen, proceeds to the step S45.

Further, when the determining result of step S48 shows that the initialdata discriminating flag FTA is set in “1”, the processing proceeds tostep S54, and determines whether or not the abnormal EEPROM is theinitial abnormality overwrite allowable EEPROM 132 a 2, and when it isnot the initial abnormality overwrite allowable EEPROM 132 a 2, proceedsto step S55, and after storing the EEPROM abnormality command showingthe abnormal EEPROM in the initial abnormality overwrite allowableEEPROM 132 a 2, proceeds to the step S45, and when the initialabnormality overwrite allowable EEPROM 132 a 2 is abnormal, proceeds tostep S56, and after storing the EEPROM abnormality command showing theabnormality of the initial abnormality overwrite allowable EEPROM 132 inthe full-time abnormality overwrite allowable EEPROM 132 b 2, proceedsto S57, and outputs an abnormality alarm signal to the alarm circuit133, and then, proceeds to the step S45.

On the other hand, when the determining result of step S47 shows thatthe EEPROMs 132 a 1 to 132 b 1 are normal, the processing proceeds tostep S58, and determines whether or not the main MCU 101 is normal bydetermining whether or not the self-watch dog timer 101 m has a clearcommand not generated within the predetermined time and stops workingbecause time is up, and when the main MCU 101 is abnormal, proceeds tostep S59, and performs the same processing as the processings of thesteps S42 to S44 and S46, and executes an abnormality storage processingfor storing a main MCU abnormality command showing that the main MCU 101is abnormal in the initial overwrite prohibition EEPROM 132 a 1 or theinitial overwrite allowable EEPROM 132 a 2 according to the state of theinitial data discriminating flag FTA, and then, proceeds to the stepS45.

Further, when the determining result of the step S58 shows that the mainMCU 101 is normal, the processing proceeds to step S60, and bydetermining whether or not the sub watch dog timer 101 s has no clearcommand generated within a predetermined time by the sub MCU 102 andstops working because time is up, determines whether or not the sub MCU102 is normal, and when the sub MCU 102 is abnormal, proceeds to stepS61, and performs the same processing as the processings of the stepsS42 to S44 and S46, and executes an abnormality storage processing forstoring a sub MCU abnormality command showing that the sub MCU 102 isabnormal in the initial overwrite prohibition EEPROM 132 a 1 or theinitial overwrite allowable EEPROM 132 a 2 according to the state of theinitial data discriminating flag FTA, and then, proceeds to the stepS45.

Further, when the determining result of the step S60 shows that the subMCU 102 is normal, the processing proceeds to step S62, and determineswhether or not the temperature of the MCU vicinity detected by thetemperature sensor 114 is normal within the range of normal temperatureset in advance, and when the temperature of the MCU vicinity is outsideof the range of the normal temperature, proceeds to step S63, andperforms the same processing as the processings of the steps S42 to S44and S46, and executes an abnormality storage processing for storing thedetection temperature of the temperature sensor 114 in the initialoverwrite prohibition EEPROM 132 a 1 or the initial overwrite allowableEEPROM 132 a 2 according to the state of the initial data discriminatingflag FTA, and then, proceeds to the step S45.

Furthermore, when the determining result of the step S62 shows that thetemperature of the MCU vicinity is within the range of the normaltemperature and is normal, the processing proceeds to step S64, andafter reading a torque detection values Tm and Ts of the main torquesensor 3 m and the sub torque sensor 3 s, and a voltage abnormalitydetection signal SA outputted from a sensor voltage monitoring unit 3 w,proceeds to step S65.

In this step S65, based on the torque detection values Tm and Ts,calculation of the following formula (1) is performed, thereby tocalculate a torque deviation ΔT.ΔT=|Tm−Ts|  (1)

Next, the processing proceeds to step S66, and determines whether or notthe calculated torque deviation ΔT is in a normal state which is belowthe setting value ΔTs set in advance, and when ΔT≦ΔTs and is in a normalstate, the processing proceeds to step S67, and resets a flag FT incourse of the torque abnormality detection to be described later to “0”,and then, proceeds to step S68, and after erasing the time sequentialdata stored in the RAM 131, proceeds to step S70 to be described later,and when ΔT>ΔTs and is in an abnormal state, proceeds to step S69, andafter setting a set detection period and definite period and performinga torque sensor abnormality detection storing processing shown in FIG. 9to detect the abnormality of the torque sensor 3, proceeds to the stepS45.

In step S70, the processing reads a voltage abnormality detection signalSA inputted from a torque sensor power supply monitoring unit 3 w, anddetermines whether or not this is normal being theoretical value “0”,and when the voltage abnormality detection signal SA is theoreticalvalue “1”, proceeds to step S71, and performs the same processing as theprocessings of the steps S42 to S44 and S46, and after executing theabnormality storing processing for storing a torque sensor power supplyabnormality command showing that the torque sensor power supply isabnormal in the initial overwrite prohibition EEPROM 132 a 1 or theinitial overwrite allowable EEPROM 132 a 2 according to the state of theinitial data discriminating flag FTA, proceeds to the step S45.

Further, when the determining result of the step S70 shows that thetorque sensor power supply is normal, the processing proceeds to stepS72, and determines whether or not a battery voltage Vb does notcontinue a state which is outside of the normal voltage range set inadvance for a predetermined of time and is normal, and when the batteryvoltage Vb is outside of the normal voltage range, performs the sameprocessing as the processings of the steps S42 to S44 and S46, and afterexecuting the abnormality storing processing for storing the batteryvoltage Vb in the initial overwrite prohibition EEPROM 132 a 1 or theinitial overwrite allowable EEPROM 132 a 2 according to the state of theinitial data discriminating flag FTA, proceeds to the step S45.

The torque sensor abnormality detection storing processing of the stepS69, as shown in FIG. 9, first, at step S691, determines whether or notthe flag FT in course of the torque abnormality detection is reset to“0”, and when this flag is reset to “0”, proceeds to step S692, andclears a detection period continuation count value N1 to “0”, and afterresetting a period state flag FS showing that it is during the detectionperiod or during the definite period to “0” which shows the detectionperiod, proceeds to step S693, and after setting the flag FT in courseof the torque abnormality detection in “1”, proceeds to the step 45.

On the other hand, when the determining result of step S691 shows thatthe flag FT in course of the torque abnormality detection is set in “1”,the processing proceeds to step S694, and determines whether or not theperiod state flag FS is set in “1”, and when this flag is reset to “0”,determines that it is detection period, and proceeds to step S695.

In this step S695, after incrementing “1” to the current detectionperiod continuation count value N1 and calculating a new detectionperiod continuation count value N1, the processing proceeds to stepS696, and determines whether or not the detection period continuationcount value N1 reaches a setting value N1s showing the termination ofthe detection period, and when N1<N1 s, determines that N1 is duringdetection period, proceeds to step S697, and after temporarily storingthe main torque detection value Tm, the sub torque detection value Ts,the motor current detection value IMD, and the speed detection value Vin the RAM 131 as the time sequential data, proceeds to the step S45.

Further, when the determining result of step S696 is N1≧N1 s, theprocessing reaches the terminating point of time of the detection periodand detects that the torque sensor 3 is abnormal, and proceeds to stepS698, and after setting a period state flag FS in “1”, proceeds to stepS699, and clears a definite period continuation count value N2 to “0”,and after that, proceeds to the step S697.

On the other hand, when the determining result of the step S684 showsthat the period state flag FS is set in “1”, the processing proceeds tostep S700, and after incrementing “1” to the current definite periodcontinuation count value N2 and calculating a new definite periodcontinuation count value N2, proceeds to step S701.

In this step S701, the processing determines whether or not the definiteperiod continuation count value N2 calculated at step S700 has reached asetting value N2 s showing the termination of the definite period, andwhen N2 <N2 s, determines that the definite period has not yetterminated, and proceeds to the step S697, and when N2≧N2 s, determinesthat the definite period has terminated and the abnormality of thetorque sensor 3 has become definite, and proceeds to step S702. Then,the processing determines whether or not the initial data discriminatingflag FTA showing whether or not the first initial abnormality analysisdata is stored in the overwrite prohibition storage area MA1 on theoverwrite prohibition EEPROM 132 a 1 is set in “1” showing that thefirst initial abnormality analysis data is stored, and when the initialdata discriminating flag FTA is reset to “0”, determines that the firstinitial abnormality analysis data is not stored in the overwrite storagearea MA1, and proceeds to step S703.

In this step S703, the processing writes the time sequential data of themain torque detection value Tm and sub torque detection value Ts storedin the RAM 131 in the overwrite prohibition storage area MA1, and then,proceeds to step S704, and erases the time sequential data stored in theRAM 131, and then, proceeds to step S705, and after setting the initialdata discriminating flag FTA in “1”, proceeds to the step S45.

Further, when the determining result of the step S702 shows that theinitial data discriminating flag FTA is set in “1”, the processingproceeds to step S706, and stores the time sequential data of the maintorque detection value Tm and the sub torque detection value Ts storedin the RAM 131 in the overwrite allowable storage area MA2 formed in theoverwrite allowable EEPROM 132 a 2, and after that, proceeds to stepS707, and erases the time sequential data stored in the RAM 131, andthen, proceeds to the step S45.

Further, in the abnormality detection storage processing of step S73 ofFIG. 8, the same processing as those of steps S691 to S707 is alsoperformed for the battery voltage Vb, and the battery voltage Vb isstored during the detection period and the definite period, and the timesequential data is stored in the RAM 131, and when the battery voltageabnormality becomes definite, the time sequential data of the batteryvoltage stored in the RAM 131 is stored in the overwrite prohibitionEEPROM 132 a 1 or the overwrite allowable EEPROM 132 a 2 according tothe state of the initial data discriminating flag FTA.

Further, the full-time abnormality detection processing, as shown inFIG. 10, first, at step S81, performs verification of writing andreading at the writing time of the EEPROMs 132 a 1 to 132 b 2, and bydetecting whether or not both of writing and reading are matched andnormal, determines whether or not the EEPROMs 132 a 1 to 132 b 2 arenormal, and when any of the EEPROMs 132 a 1 to 132 b 2 are abnormal,proceeds to step S82, and determines whether or not an initial datadiscriminating flag FTB is set in “1”, and when this flag is set to “0”,proceeds to step S83, and determines whether or not the abnormal EEPROMis the full-time abnormality overwrite prohibition EEPROM 132 b 1, andwhen the full-time abnormality overwrite prohibition EEPROM 132 b 1 isnormal, proceeds to step S85, and after storing the EEPROM abnormalitycommand showing that any of the abnormal EEPROMs 132 a 2, 132 b 1 and132 b 2 is abnormal in the full-time abnormality overwrite prohibitionEEPROM 132 b 1, proceeds to step S85, and after setting the initial datadiscriminating flag FTB in “1”, terminates the timer interruptprocessing, and returns to the predetermined main program, and when thefull-time abnormality overwrite prohibition EEPROM 132 b 1 is abnormal,proceeds to step S86, and stores the EEPROM abnormality command showingthat the full-time abnormality overwrite prohibition EEPROM 132 b 1 isabnormal in the full-time abnormality overwrite allowable EEPROM 132 b2, and then, proceeds to step S87, and after outputting an abnormalityalarm signal to the alarm circuit 133, terminates the timer interruptprocessing, and returns to the predetermined program.

Further, when the determining result of step S82 shows that the initialdata discriminating flag FTB is set in “1”, the processing proceeds tostep S88, and determines whether or not the abnormal EEPROM is thefull-time abnormality overtime allowable EEPROM 132 b 2, and when theabnormal EEPROM is not the full-time abnormality overtime allowableEEPROM 132 b 2, proceeds to step S89, and after storing the EEPROMabnormality command showing the abnormal EEPROM in the full-timeabnormality overwrite allowable EEPROM 132 b 2, terminates the timerinterrupt processing and returns to the predetermined main program, andwhen the full-time abnormality overwrite allowable EEPROM 132 b 2 isabnormal, proceeds to step S90, and after storing the EEPROM abnormalitycommand showing the abnormality of the full-time abnormality overwriteallowable EEPROM 132 b 2 in the initial abnormality overwrite allowableEEPROM 132 a 2, proceeds to step S91, and outputs the abnormality alarmsignal to the alarm circuit 133, and then, terminates the timerinterrupt processing and returns to the predetermined main program.

On the other hand, the determining result of step S81 shows that theEEPROMs 132 a 1 to 132 b 1 are normal, proceeds to step S92, and bydetermining whether or not the self watch dog timer 101 m has a clearcommand not generated within the predetermine time and stops workingbecause time is up, determines whether or not the main MCU 101 isnormal, and when the main MCU 101 is abnormal, proceeds to step S93, andperforms the same processing as the processings of the steps S42 to S44and S46 in the initial abnormality detection processing shown in FIG. 8,and after executing the abnormality storing processing for storing amain MCU abnormality command showing that the main MCU 101 is abnormalto the full-time overwrite prohibition EEPROM 132 b 1 or the full-timeoverwrite allowable EEPROM 132 b 2 according to the state of the initialdata discriminating flag FTB, terminates the timer interrupt processingand returns to the predetermined main program.

Further, when the determining result of the step S92 shows that the mainMCU 101 is normal, the processing proceeds to step S94, and bydetermining whether or not the sub watch dog timer 101 s has a clearcommand not generated by the sub MCU 102 within the predetermined timeand stops working because time is up, determines whether or not the subMCU 102 is normal, and when the sub MCU 102 is abnormal, proceeds tostep S103, and performs the same processing as the processings of thesteps S42 to S44 and S46 of FIG. 8, and after executing an abnormalitystorage processing for storing a sub MCU abnormality command showingthat the sub MCU 102 is abnormal in the full-time overwrite prohibitionEEPROM 132 b 1 or the full-time overwrite allowable EEPROM 132 b 2according to the state of the initial data discriminating flag FTB,terminates the timer interrupt processing and returns to thepredetermined main program.

Further, when the determining result at the step S94 shows that the subMCU 102 is normal, the processing proceeds to step S96, and bydetermining whether or not the steering assist compensation values IM*′calculated by the main MCU 101 and the sub MCU 102 are approximatelymatched, determines whether or not the command value calculations ofboth the main MCU 101 and the sub MCU 102 are normal, and when both ofthe steering assist compensation values IM*′ differ more than thepredetermined value, determines that the command value calculation ofthe main MCU 101 is abnormal, thereby to proceed to step S97, andperforms the same processing as the processings of the steps S42 to S44and S46 of FIG. 8, and after executing the abnormality storingprocessing for storing a main MCU command value calculation abnormalitycommand showing that the command value calculation of the main MCU 101is abnormal in the full-time overwrite prohibition EEPROM 132 b 1 or thefull-time overwrite allowable EEPROM 132 b 2 according to the state ofthe initial data discriminating flag FTB, terminates the timer interruptprocessing and returns to the predetermined main program.

Further, when the determining result at the step S96 shows that thecommand value calculation is normal, the processing proceeds to stepS98, and by determining whether or not the motor current IMD detected bythe motor current detection circuit 112 continues a predetermined valueabnormality for a predetermined time, determines whether or not themotor current IMD is normal, and when the motor current IMD is an excesscurrent abnormality, proceeds to step S99, and performs the sameprocessing as the processings of the steps S42 to S44 and S46 of FIG. 8,and after executing the abnormality storing processing for storing thevalue of the abnormal motor current IMD in the full-time overwriteprohibition EEPROM 132 b 1 or the full-time overwrite allowable EEPROM132 b 2 according to the state of the initial data discriminating flagFTB, terminates the timer interrupt processing and returns to thepredetermined main program.

Further, when the determining result of the step S98 shows that themotor current IMD is normal, the processing proceeds to step S100, anddetermines whether or not a motor control system in which a drivingpower supply abnormality of the motor driving circuit 110, a motorneutral point abnormality, a position signal detection power supplyabnormality, a position detection hole IC abnormality, and the like arenot generated is normal, and when an abnormality is generated in themotor control system, proceeds to step S101, and performs the sameprocessing as the processings of the steps S42 to S44 and S46 of FIG. 8,and after executing the abnormality storing processing for storing theabnormality command showing the cause of the abnormality in thefull-time overwrite prohibition EEPROM 132 b 1 or the full-timeoverwrite allowable EEPROM 132 b 2 according to the state of the initialdata discriminating flag FTB, terminates the timer interrupt processingand returns to the predetermined main program.

Furthermore, when the determining result of step S100 shows that themotor control system is normal, the processing proceeds to step S102,and determines whether or not MCU vicinity temperature detected by thetemperature sensor 114 is within the range of the normal temperature setin advance and is normal, and when the MCU vicinity temperature isoutside of the normal temperature, proceeds to step S103, and performsthe same processing as the processings of the steps S42 to S44 and S46of FIG. 8, and after executing the abnormality storing processing forstoring the detected temperature of the temperature sensor 114 in thefull-time overwrite prohibition EEPROM 132 b 1 or the full-timeoverwrite allowable EEPROM 132 b 2 according to the state of the initialdata discriminating flag FTB, terminates the timer interrupt processingand returns to the predetermined main program.

Further, when the determining result of the step 102 shows that the MCUvicinity temperature is within the range of the normal temperature andis normal, the processing proceeds to step S104, and after reading thetorque detection values Tm and Ts of the main torque sensor 3 m and thesub torque sensor 3 s, and the voltage abnormality detection signal SAoutputted from the sensor voltage monitoring unit 3 w, proceeds to stepS105.

In this step S105, the processing determines whether or not the maintorque detection value Tm detected by the main torque sensor 3 m iswithin the normal range of the upper limit value Tmsu to the lower limitvalue Tmsl which are set in advance, and when the value Tm is outside ofthe normal range, proceeds to step S106, and similarly to theabnormality detection storing processing of FIG. 9, sets the detectionperiod and definite period, and stores the main torque detection valueTm in the RAM 131 as the time sequential data, and further, replaces theflag FT in course of the torque abnormality detection by a flag FTm incourse of the torque abnormality detection, and after performing theabnormality detection storing processing for replacing the initial datadiscriminating flag FTA by the initial data discriminating flag FTB,terminates the timer interrupt processing and returns to the mainprogram.

Further, when the determining result of step S105 shows that the maintorque sensor 3 m is normal, the processing proceeds to step S107, andresets the flag FTm in course of the torque abnormality detection to“0”, and then, proceeds to step S108, and after erasing the timesequential data stored in the RAM 131, proceeds to step S109.

In this step 109, the processing determines whether or not the maintorque detection value Ts detected by the sub torque sensor 3 s iswithin the normal range of the upper limit value Tssu to the lower limitvalue Tssl which are set in advance, and when the value Ts is outside ofthe normal range, proceeds to step S110, and similarly to theabnormality detection storing processing of FIG. 9, sets the detectionperiod and definite period, and stores the sub torque detection value Tsin the RAM 131 as the time sequential data, and further, replaces theflag FT in course of the torque abnormality detection by a flag FTs incourse of the torque abnormality detection, and after performing theabnormality detection storing processing for replacing the initial datadiscriminating flag FTA by the initial data discriminating flag FTB,terminates the timer interrupt processing and returns to the mainprogram.

Further, when the determining result of step S109 shows that the subtorque sensor 3 s is normal, the processing proceeds to step S111, andresets the flag FTs in course of the torque abnormality detection to“0”, and then, proceeds to step S112, and after erasing the timesequential data stored in the RAM 131, proceeds to step S113.

In this step S113, the processing performs the calculation of theformula (1) based on the torque detection values Tm and Ts, thereby tocalculate the torque deviation ΔT, and then, proceeds to step S114, anddetermines whether or not the calculated torque deviation ΔT is in anormal state below the setting value ΔTs set in advance, and when ΔT>ΔTsand in an abnormal state, proceeds to step S115, and sets the samedetection period and definite period as the abnormality detectionstoring processing of FIG. 9, and after performing the torque sensorabnormality detection storing processing for replacing the initial datadiscriminating flag FTA by the initial data discriminating flag FTB,terminates the timer interrupt processing and returns to thepredetermined main program, and when ΔT≦ΔTs and in an normal state,proceeds to step S116, and resets the flag FT in course of the torqueabnormality detection to “0”, and then proceeds to step S117, and aftererasing the time sequential data stored in the RAM 131, proceed to stepS118 to be described later.

In this step S118, the processing reads the voltage abnormalitydetection signal SA inputted from the torque sensor power supplymonitoring unit 3 w, and determine whether or not this signal is atheoretical value “0” and normal, and when the voltage abnormalitydetection signal SA is a theoretical value “1”, proceeds to step S119,and performs the same processing as the processings of the steps S42 toS44 and S46 of FIG. 8, and after executing the abnormality storingprocessing for storing the torque sensor power supply abnormalitycommand showing that the torque sensor power supply is abnormal in thefull-time overwrite prohibition EEPROM 132 b 1 or the full-timeoverwrite allowable EEPROM 132 b 2 according to the state of the initialdata discriminating flag FTB, terminates the timer interrupt processingand returns to the predetermined main program.

Further, when the determining result of the step S118 shows that thetorque sensor power supply is normal, the processing proceeds to stepS120, and determines whether or not the battery voltage Vb does notcontinue for a predetermined time outside of the normal voltage rangeset in advance and is normal, and when the battery voltage Vb isabnormal, performs the same processing as the processings of the stepsS42 to S44 and S46 of FIG. 8, and after executing the abnormalitystoring processing for storing the battery voltage Vb in the full-timeoverwrite prohibition EEPROM 132 b 1 or the full-time overwriteallowable EEPROM 132 b 2 according to the sate of the initial datadiscriminating flag FTB, terminates the timer interrupt processing andreturns to the predetermined main program.

Furthermore, when the determining result of step S120 shows that thebattery voltage Vb is normal, the processing proceeds to step S122, andby determining whether or not a speed abnormality signal is inputtedfrom the speed sensor 17, determine whether or not speed sensor 17 isnormal, and when the speed sensor 17 is abnormal, proceeds to step S123,and after performing the abnormality detection storing processing toperform the same processing as the processings of the steps S691 to S699of FIG. 9 in which the definite period set to 100 ms in sampling cycleand 60 sec in detection period is omitted, terminates the timerinterrupt processing and returns to the predetermined main program.

Incidentally, in the full-time abnormality detection processing, whenthe abnormality detection storing processing is performed, in order tomake subsequent abnormality analysis easy, as time sequential data, themain torque detection value Tm, the sub torque detection value Ts, themotor driving signal IM, and the speed detection value T are stored as aset.

In the processings of FIG. 5 and FIGS. 7 to 10, the steering assistcontrol mechanism is constituted by the processing of FIG. 5 and thesteering assist mechanism 10, and the processings of FIGS. 7 to 10correspond to the abnormality detection means of S41, S47, S58, S60,S62, S64 to S66, S70, S72, S81, S92, S94, S96, S98, S100, S102, S104,S105, S109, S112, S114, S118, S120, and S122, and the steps S42 to S44,S48 to S57, S59, S61, S63 to S65, S67 to S69, S71, and S73, theprocessings of FIG. 9, and the processings of S82 to S91, S93, S95, S97,S99, S101, S106 to S108, S110 to S112, S115, S119, S121, and S123correspond to the abnormality data storage means.

Next, the operation of the aforementioned embodiment will be described.

Now, at the shipment stage after having completed the fitting of thecontroller of the electric power steering apparatus at a manufacturingplant, the initial abnormality overwrite prohibition EEPROM 132 a 1, theinitial abnormality overwrite allowable EEPROM 132 a 2, and thefull-time abnormality overwrite prohibition EEPROM 132 b 1 and thefull-time abnormality overwrite allowable EEPROM 132 b 2 constitutingEEPROM 132 are totally not recorded with the abnormality analysis dataand put into a clear state, and at the same time, various flags such asthe abnormality state flag AF, the initial data discriminating flags FTAand FTB, the flag FT in course of the abnormality detection, the periodstate flag FS, and the like are all reset to “0”.

In order to start using the vehicle from this shipment state, a keyswitch is put into an ON state, so that the power supply is put into thecontroller 14, and the processings of FIG. 5 and FIGS. 7 to 9 areexecuted and started by the main MCU 101, and at the same time, theprocessing of FIG. 5 is executed and started by the sub MCU 102. At thistime, in the main MCU 101, when an ignition switch is put into an ONstate, at the inputting time of the power supply, first, the initialabnormality detection processing shown in FIG. 8 is executed, it isdetermined whether or not the RAM 131, the EEPROMs 132 a 1 and 132 a 2,and 132 b 1 and 132 b 2, the main MCU 101, and the sub MCU 102 arenormal, and at the same time, the initial diagnosis is made as towhether or not the MCU vicinity temperature is normal and the torquesensor 3 m is normal, and when each unit is normal by this diagnosis,the steering assist control processing of FIG. 5 and the full-timeabnormality detecting processing of FIG. 10 are executed.

In the steering assist control processing of FIG. 5, a neutral voltageV0 is subtracted from the torque detection value T detected by thesteering torque sensor 3, thereby to calculate the steering torque Ts(step S2), and then, the speed detection value V is read from the speedsensor 17 (step S3), and based on the steering torque Ts and the speeddetection value V, the steering assist command value IM* is calculatedby referring to the steering assist command value calculation map shownin FIG. 6 (step S4).

On the other hand, the processing reads the motor angular speed ωpresumed by the motor angular speed estimation circuit 20 (step S5), andbased on this motor angular speed ω, calculates the inertia compensationvalue Ii for inertia compensation control, and calculates the frictioncompensation value If for friction compensation control (step S6), andfurther, differentially calculates the steering torque Ts, thereby tocalculate the center response improvement command value Ir (step S7),and adds these inertia compensation value Ii, the friction compensationvalue If, and the center response improvement compensation value Ir tothe steering assist command value IM* and calculates the steering assistcompensation value IM*′ (step S8).

The processing subjects the steering assist compensation value IM*′ todifferential calculation processing so as to calculate the differentialvalue Id for differential compensation control in the feed forwardcontrol (step S9), and then, subtracts the motor current compensationvalue IMA, thereby to calculate the current deviation ΔI (step S10), andsubjects the calculated current deviation ΔI to comparison calculationprocessing so as to calculate the comparison value ΔIp for comparisoncompensation control, and performs integral calculation processing so asto calculate an integral value ΔIi for integral compensation control(steps Si 1 and S12), and then, adds the integral value Id, thecomparison value ΔIp, and the integral value ΔIi, thereby to calculatethe motor driving signal IM (step S13).

At this time, in the abnormality detection processing of FIG. 7, assumethat the abnormality is not detected in the steering assist controlsystem and the abnormality state flag AF is reset to “0”, the processingproceeds to step S16, and by outputting the calculated motor drivingsignal IM to the motor driving circuit 110, supplies the driving currentto the electric motor 13 from the motor driving circuit 110, and allowsthe steering assist force corresponding to the steering torque operatedon the steering wheel 1 by this electric motor 13 to be generated, andoutput this steering assist force to the output shaft 2 b through thereduction gear 11.

At this time, in a so-called steering state without driving while avehicle is in a parking state, since the inclination of thecharacteristic line of the steering assist command value calculation mapshown in FIG. 6 is sharp, so that a large steering assist command valueIM* is calculated by a small steering torque Ts, and thus, a largesteering assist force is generated by the electric motor 13, therebyenabling to perform light steering.

On the other hand, when the vehicle starts moving and exceeds apredetermined speed, the inclination of the characteristic line of thesteering assist command value calculation map of FIG. 6 becomes small,so that a small steering assist command value IM* is calculated even bya large steering torque Ts, and thus, the steering assist forcegenerated by the electric motor 13 becomes small, thereby enabling toperform an optimum steering by preventing the steering of the steeringwheel 1 from becoming too light.

On the other hand, in the full-time abnormality detection processing ofFIG. 10, since the full-time abnormality detection processing isexecuted as a timer interrupt processing for every predetermined time,the processing determines in full-time whether or not the EEPROMs 132 a1 to 132 b 2, the main MCU 101, and the sub MCU 102 are normal, and atthe same time, always determines whether or not the command valuecalculation by the main MCU 101 is normal, the motor current IM isnormal, the motor control system is normal, the MCU vicinity temperatureis normal, the torques sensor 3 m is normal, the battery voltage Vb isnormal, and the speed sensor 17 is normal.

In case the abnormality is not detected by the full-time abnormalitydetection processing, the steering assist control processing of FIG. 5is continuously executed.

From this normal state of the steering assist control mechanism, forexample, a short-circuit, a disconnection, and the like are generated inthe main torque sensor 3 m of the steering torque sensor 3, and when thesteering torque detection value T is put into a state deviating outsideof the normal range, in the processing of FIG. 10, the processingproceeds to step S106 from step S105, and executes the same processingsas FIG. 9, and then, the main torque detection value Tm, the sub torquedetection value Ts, the motor current IM, and the speed V are stored inthe RAM 131 as time sequential data within the detection period of thepredetermined time by a predetermined sampling cycle, and after that,within the definite period of the predetermined time, similarly, themain torque detection value Tm, the sub torque detection value Ts, themotor current IM, and the speed V are stored in the RAM 131 as timesequential data by a predetermined sampling cycle.

When the definite period is over and if it is a first-time abnormality,since the initial data discriminating flag FTB is reset to “0”, the timesequential data is stored in the full-time abnormality overwriteprohibition EEPROM 132 b 1 as shown in FIG. 4, and when a selfabnormality or another abnormality is generated at the beginning and theinitial data discriminating flag FTB is set in “1”, the time sequentialdata is stored in the full-time abnormality overwrite allowable EEPROM132 b.

Similarly, during the execution of the full-time abnormality detectionprocessing, when the abnormality outside of the normal range isgenerated in the sub torque sensor 3 s or an abnormality in which thedeviation ΔT of the main torque detection value Tm and the sub torquedetection value Ts exceeds the predetermined value ΔTs, the abnormalitydetection storing processing of FIG. 9 is performed, similarly to theaforementioned, thereby storing the time sequential data of thedetection period and the definite period in the full-time abnormalityoverwrite prohibition EEPROM 132 b 1 or the full-time abnormalityoverwrite allowable EEPROM 132 b according to the state of the initialdata discriminating flag FTB.

On the other hand, during the full-time abnormality detectionprocessing, when an abnormality is generated in the main MCU 101, thesub MCU 102, the command value calculation of the main MCU 101, themotor current IM, the motor control system, the MCU vicinitytemperature, and the battery voltage Vb, at the point of time when theabnormality is generated, the abnormality command showing theabnormality generated according to the state of the initial datadiscriminating flag FTB is stored in the full-time abnormality overwriteprohibition EEPROM 132 a 1 or the full-time abnormality overwriteallowable EEPROM 132 b 2.

In this way, in the full-time abnormality detection processing, theabnormality generated at the beginning after the shipment is stored byany of the time sequential data, the abnormality command, and theabnormality detection value in the full-time abnormality overwriteprohibition EEPROM 132 b 1, and since the subsequent overwrite isprohibited, a first abnormality generated in the operating state of thesteering assist controller is reliably retained, and the abnormalitygenerated subsequently is overwritten and stored in the overwriteallowable EEPROM 132 b 2.

Hence, in case the analysis is performed when the abnormality isgenerated in the steering assist controller, by reading the abnormalityanalysis data stored in the EEPROMs 132 b 1 and 132 b 2, it is possibleto reliably grasp what has caused the generation of the firstabnormality, and though the subsequent abnormalities are overwritten andstored, it is possible to grasp whether or not other abnormalities aregenerated.

Similarly, in the initial abnormality detection processing of FIG. 8,when the abnormality is generated at the beginning, any one of the timesequential data, the abnormality command, and the abnormality detectionvalue is stored in the initial abnormality overwrite prohibition EEPROM132 a 1, and when the abnormality subsequent to the second time isgenerated, the subsequent abnormality is overwritten and stored in theinitial abnormality overwrite allowable EEPROM 132 a 2.

Hence, the abnormality generated in the initial state in which the powersupply is inputted to the steering controller can be reliably stored inthe initial abnormality overwrite prohibition EEPROM 132 a 1 and theinitial abnormality overwrite allowable EEPROM 132 a 2, and thus, theabnormality analysis can be accurately performed.

In this way, according to the foregoing embodiment, when the abnormalityis detected by two abnormality detection processings of the initialabnormality detection processing and the full-time abnormality detectionprocessing, any one of the time sequential data, the abnormalitycommand, and the abnormality detection value is stored individually inthe overwrite prohibition EEPROMs 132 a 1 and 132 a 2, and 132 b 1 and132 b 2, and it is, therefore, possible to accurately grasp whether theabnormality of the steering assist controller is generated in theinitial state or in the subsequent operating state of the steeringassist device, and thus, the abnormality analysis can be much accuratelyperformed.

Furthermore, when the user detects an abnormality of the steering assistcontrol mechanism and requests the dealer and the like to repair theabnormality, in case the abnormality is generated again when confirmingthe abnormality by activating the steering assist control processingagain at a repair facility, the abnormality analysis data collected atthis time is overwritten and stored in the overwrite allowable EEPROMs132 a 2 or 132 b 2, and the initial abnormality analysis data stored inthe overwrite prohibition EEPROMs 132 a 1 and 132 b 1 is not overwrittenand can be reliably retained.

Incidentally, in the foregoing embodiment, though a description has beenmade on the case where the overwrite prohibition EEPROMs 132 a 1 and 132b 1 and the overwrite allowable EEPROMs 132 a 2 and 132 b 2 are providedone each, respectively, the case is not limit to this, and each of theEEPROMs 132 a 1, 132 a 2, 132 b 1 and 132 b 2 may be provided in aplurality, respectively or this may be not limited to the case whereeach of the EEPROMs 132 a 1, 132 a 2, 132 b 1, and 132 b 2 is providedin the same number, but each EEPROM may be provided individually in thearbitrary number.

Furthermore, in the foregoing embodiment, though a description has beenmade on the case where the overwrite prohibition EEPROM 132 a 1 and 132b 1 are totally prohibited from being overwritten, the case is notlimited to this, and in case the abnormality command other than the timesequential data or the abnormality detection value is stored, since thedata amount thereof is few, an overwrite data management unit foraccumulating the overwrite data amount in a nonvolatile memory isprovided, and by this overwrite data management unit, memory can becontinued during a period until the memory amount of the overwriteprohibition EEPROMs 132 a 1 and 132 b 1 becomes maximum.

That is, as shown in FIG. 11, a data management EEPROM 132 c is newlyprovided in the main MCU 101, and as shown in FIG. 12, a data writemanagement processing for managing the data amount stored in theoverwrite prohibition EEPROMs 132 a 1 and 132 b 1 is executed by themain MCU 101. This data write management processing is executed as atimer interrupt processing for every predetermined time (for example, 2msec), and first, at step S201, determines whether or not it is in astate of data write to the overwrite prohibition EEPROMs 132 a 1 and 132b 1, and when it is not in a state of data write to the overwriteprohibition EEPROMs 132 a 1 and 132 b 1, terminates the timer interruptprocessing as it is, and returns to the predetermined main program. Whenthe determining result of step S201 shows that it is in a state of datawrite to the overwrite prohibition EEPROMs 132 a 1 and 132 b 1, theprocessing proceeds to step S202, and determines whether or not a writeobject is the overwrite prohibition EEPROM 132 a 1, and when the writeobject is the overwrite prohibition EEPROM 132 a 1, proceeds to stepS203, and determines whether or not the initial data discriminating flagFTA is “1”, and when this initial data discriminating flag FTA is “0”,proceeds to step S204, and reads a data amount Dal stored in the datamount storage area for the EEPROM 132 a 1 of the data management EEPROMnewly provided, and then, proceeds to step S205, and adds a data amountda newly written from now to the read data amount Da1, thereby tocalculate a new data amount Da1 (=Da1+da).

Next, the processing proceeds to step S206, and determines whether ornot the calculated data amount Da1 has reached an allowable data amountDas of the overwrite prohibition EEPROM 132 a 1, and when Da1≦Das,proceeds to step S207, and after writing the new abnormality data in theoverwrite prohibition EEPROM 132 a 1, terminates the timer interruptprocessing and returns to the predetermined main program.

On the other hand, when the determining result of step S206 shows thatDa1>Das, the processing proceeds to step S208, and after setting theinitial data discriminating flag FTA in “1”, proceeds to step S209, andafter writing the new abnormality data in the overwrite allowable EEROM132 a 2, terminates the timer interrupt processing and returns to thepredetermined main program.

Further, when the determining result of the step S203 shows that theinitial data discriminating flag FTA is “1”, the processing proceedsdirectly to step S209.

Further, when the determining result of the step S202 shows that thewrite object is the overwrite prohibition EEPROM 132 b 1, the processingproceeds to step S210, and determines whether or not the initial datadiscriminating flag FTB is “1”, and when this initial datadiscriminating flag FTB is “0”, proceeds to step S211, reads a dataamount Db1 stored in the data amount storage area for the EEPROM 132 b 1of the data management EEPROM newly provided, and then, proceeds to stepS212, and adds a data amount db written from now to the read data amountDb1, thereby to calculate a new data amount Db1 (=Db1+db).

Subsequently, the processing proceeds to step S213, and determineswhether or not the calculated data amount Db1 has reached an allowabledata amount Dbs of the overwrite prohibition EEPROM 132 b 1, and whenDb1≦Dbs, proceeds to step S214, and after writing the new abnormalitydata in the overwrite prohibition EEPROM132 b 1, terminates the timerinterrupt processing and returns to the predetermined main program.

On the other hand, when the determining result of step S213 shows thatDb1>Dbs, the processing proceeds to step S215, and after setting theinitial data discriminating flag FTB in “1”, proceeds to step S216, andafter writing the new abnormality data in the overwrite allowable EEPROM132 b 2, terminates the timer interrupt processing and returns to thepredetermined main program.

Further, when the determining result of the step S210 shows that theinitial data discriminating flag FTB is “1”, the processing proceedsdirectly to step S216.

In this manner, in case the management of the initial datadiscriminating flags FTA and FTB by the data write management processinggenerates a vacancy in storage capacity of the overwrite prohibitionEEPROMs 132 a 1 and 132 b 1, the abnormality data is written in order inthese overwrite prohibition EEPROMs 132 a 1 and 132 b 1, and by writingthe abnormality data in the overwrite allowable EEPROMs 132 a 2 and 132b 2 in a state in which the overwrite prohibition EEPROMs 132 a 1 and132 b 1 are fully occupied, a large number of abnormality data can besaved without overwriting. In this case, the time sequential datastorage area for storing the aforementioned time sequential data whichis important as analysis data is secured in the overwrite prohibitionEEPROMs 132 a 1 and 132 b 1, and this time sequential data storage areais prohibited from being written with other abnormality data, and otherabnormality data can be stored in the storage area other than the timesequential data storage area until its storage capacity is fullyoccupied. For this purpose, by determining whether or not the datawritten in the overwrite prohibition EEPROMs 132 a 1 and 132 b 1 is atime sequential data, and determining whether or not an initial timesequential data is stored in the time sequential data storage area, whenit is a time sequential data, the initial time sequential data is storedin the time sequential data storage area, and when it is the next timesequential data, it may be decided whether or not the data is storedaccording to the remaining capacity of other storage area.

In this case, when the abnormality other than the abnormality includingthe time sequential data is generated, a plurality of abnormalities canbe stored in the overwrite prohibition EEPROMs 132 a 1 and 132 b 1, andthe abnormality analysis when a complex abnormality is generated can bemuch accurately performed.

Further, as shown in FIG. 3, at a repair facility, an abnormalitydiagnosis device 29 is connected to the main MCU 101, and a datatransfer processing as shown in FIG. 13 is performed by the main MCU101, thereby to read the initial abnormality analysis data and thefull-time abnormality analysis data stored in the overwrite prohibitionEEPROMs 132 a 1 and 132 b 1 and the overwrite allowable EEPROMs 132 a 2and 132 b 2, so that an accurate abnormality analysis can be performed.Upon termination of this abnormality analysis, a reset signal forresetting the initial data discriminating flags FTA and FTB to “0” fromthe abnormality diagnosis device 29 is inputted into the main MCU 101,so that the writing of the initial abnormality analysis data into theoverwrite prohibition EEPROMs 132 a 1 and 132 b 1 can be made.

Here, the data transfer processing, as shown in FIG. 13, is executed asa timer interrupt processing for every predetermined time (for example,2 msec) when the abnormality diagnosis device 29 is connected to themain MCU 101, and first at step S220, determines whether or not a datatransfer request is inputted from the abnormality diagnosis device 29,and when the data transfer request is inputted, proceeds to step S221,and reads the initial abnormality analysis data and the full-timeabnormality analysis data stored in the overwrite prohibition EEPROMs132 a 1 and 132 b 1 and the overwrite allowable EEPROMs 132 a 2 and 132b 2, and after transferring them to the abnormality diagnosis device 29,terminates the timer interrupt processing.

Further, when the determining result of the step S220 shows that thedata transfer request is not inputted, the processing proceeds to stepS222, and determines whether or not a reset signal is inputted, and whenthe reset signal is not inputted, terminates the timer interruptprocessing as it is, and when the reset signal is inputted, proceeds tostep S223, and after resetting the initial data discriminating flags FTAand FTB stored in the normal EEPROMs 132 a 1 to 132 b 2 to “0”,terminates the timer interrupt processing and returns to thepredetermined main program.

In the data transfer processing of this FIG. 13, the processings ofsteps S222 and S223 correspond to flag reset means.

Further, the EEPROMs 132 a to 132 b are made detachable attachable, andafter removing these EEPROMs and installing them in the abnormalitydiagnosis device 29, the abnormality analysis is performed, and theresetting of flags FTA and FTB may be performed. In this case, theabnormality diagnosis device 29 corresponds to flag reset means.

Furthermore, in the foregoing embodiment, though a description has beenmade on the case where the motor driving current IM is calculated bysoftware processing executed by a central processor 32, the case is notlimited to this, and by hardware combining a steering assist commandvalue computing unit, a center response improvement circuit, an inertiacompensator, a friction compensator, a differential compensator, asubtracter, a comparison compensator, an integral computing unit, anadder and the like, the motor driving current IM may be calculated.

Furthermore, in the foregoing embodiment, though a description has beenmade on the case where the EEPROMs are adopted as storage means, thecase is not limited to this, and an arbitrary nonvolatile memory such asa flash memory and the like may be adopted. Further, the type of thetime sequential data written in the EEPROMs can be sets arbitrarilyaccording to the abnormality generated.

Further, when the abnormality affecting the normal operation of theelectric power steering apparatus is detected by the initial abnormalitydetection processing and the full-time abnormality detection processingin the main MCU 101, the steering assist control processing of FIG. 5may be terminated.

Further, in the foregoing embodiment, though a description has been madeon the case where the initial abnormality detection processing and thefull-time abnormality detection processing are performed only by themain MCU 101, the case is not limited to this, and even by the sub MCU102, the EEPROMs are provided, so that the initial abnormality detectionprocessing and the full-time abnormality detection processing may beperformed.

1. A controller of an electric power steering apparatus, comprising: asteering assist control mechanism comprising an electric motor giving asteering assist force to a steering system; abnormality detection meansfor detecting an abnormality of the steering assist control mechanism;and abnormality data storage means for storing abnormality analysis datafor analyzing the abnormality in storage means when the abnormality ofthe steering assist control mechanism is detected by the abnormalitydetection means, wherein said storage means comprises an overwriteprohibition storage area for prohibiting an overwrite of saidabnormality analysis data and an overwrite allowable storage area foroverwriting and storing said abnormality analysis data, and wherein saidabnormality data storage means is constituted to store an abnormality ofthe steering assist control mechanism detected by the abnormalitydetection means in said overwrite prohibition storage area when theabnormality is a first abnormality analysis data, and store theabnormality in said overwrite allowable storage area when theabnormality is the abnormality analysis data subsequent to the secondtime.
 2. The controller of the electric power steering apparatusaccording to claim 1, wherein said storage means is constituted by anelectrically erasable read-only memory.
 3. The controller of theelectric power steering apparatus according to claim 1, wherein saidabnormality data storage means is constituted to have an initial datadiscriminating flag set when an initial abnormality analysis data isstored in said storage means, and store the abnormality analysis data asthe initial abnormality analysis data in said overwrite prohibitionstorage area in case said abnormality analysis data is inputted when theinitial data discriminating flag is reset, and store the abnormalityanalysis data in said overwrite allowable storage area as theabnormality analysis data subsequent to the initial abnormality analysisdata when the initial data discriminating flag is set.
 4. The controllerof the electric power steering apparatus according to claim 3, whereinsaid abnormality data storage means comprises flag reset means forresetting said initial data discriminating flag when an analysisprocessing of the abnormality analysis data is performed.
 5. Thecontroller of the electric power steering apparatus according to claim1, wherein said storage means has a plurality of overwrite prohibitionstorage areas.
 6. A controller of an electric power steering apparatus,comprising: a steering assist control mechanism comprising an electricmotor giving a steering assist force to a steering system; initialabnormality detection means for detecting an abnormality at theoperation starting time of the steering assist control mechanism;full-time abnormality detection means for detecting the abnormality infall time after the operation starting time of said steering controlmechanism; and abnormality data storage means for storing theabnormality analysis data for analyzing the abnormality in the storagemeans when the abnormality is detected by said initial abnormalitydetection means and said full-time abnormality detection means, whereinsaid storage means comprises initial abnormality and full-timeabnormality overwrite prohibition storage areas for prohibiting theoverwrite of said abnormality analysis data and the initial abnormalityand full-time abnormality overwrite allowable storage areas foroverwriting and storing the abnormality analysis data individuallycorresponding to said initial abnormality detection means and saidfull-time abnormality detection means, and wherein the abnormality datastorage means is constituted to store an abnormality of the steeringassist control mechanism detected by said initial abnormality detectionmeans in said initial abnormality overwrite prohibition storage areawhen the abnormality is an initial abnormality analysis data, and storethe abnormality in said initial abnormality overwrite allowable storagearea when the abnormality is the initial abnormality analysis datasubsequent to the second time, and store the abnormality in saidfull-time abnormality overwrite prohibition storage area when theabnormality of the steering assist control mechanism detected by saidfull-time abnormality detection means is an initial abnormality analysisdata, and store the abnormality in said full-time abnormality overwriteallowable storage area when the abnormality is the full-time abnormalityanalysis data subsequent to the second time.
 7. The controller of theelectric power steering apparatus according to claim 1, wherein saidabnormality data storage means is constituted to retain the abnormalityanalysis data during a predetermined time before and after theabnormality detection in time sequence.
 8. The controller of theelectric power steering apparatus according to claim 7, wherein saidabnormality analysis data is constituted by the time sequential data ofthe detection period comprising a first predetermined time leading tothe generation of the abnormality and the time sequential data of theconfirmation period from the expiry of said detection period to thesecond predetermined time.
 9. The controller of the electric powersteering apparatus according to claim 6, wherein said initialabnormality detection means is constituted to perform any one or aplurality of the initial abnormality detection of the toque detectionmeans included in said steering assist control mechanism, the initialabnormality detection of the control means included in said steeringassist control mechanism, the initial abnormality detection of thecurrent detection means included in said steering assist controlmechanism, the initial abnormality detection of the electric motorincluded in said steering assist control mechanism, the initialabnormality detection of the power supply system and the initialabnormality detection of said memory.
 10. The controller of the electricpower steering apparatus according to claim 6, wherein said full-timeabnormality detection means is constituted to perform any one or aplurality of the full-time abnormality detection of the toque detectionmeans included in said steering assist control mechanism, the full-timeabnormality detection of the control means included in said steeringassist control mechanism, the full-time abnormality detection of thecurrent detection means included in said steering assist controlmechanism, the full-time abnormality detection of the electric motorincluded in said steering assist control mechanism, the full-timeabnormality detection of the speed detection means included in saidsteering assist control mechanism and the full-time abnormalitydetection of the power supply system.
 11. The controller of the electricpower steering apparatus according to claim 6, comprising data amountmanaging means for managing the data amount initially stored in saidinitial abnormality overwrite prohibition storage area and the full-timeabnormality overwrite prohibition storage area, and storage data addingmeans for additionally storing new abnormality analysis data in theinitial abnormality overwrite prohibition storage area and the full-timeabnormality overwrite prohibition storage area by determining whether ornot the abnormality analysis data is storable and if storable based onthe data amount managed by said data amount managing means when theabnormality analysis data is generated next.
 12. The controller of theelectric power steering apparatus according to claim 11, wherein saiddata managing means is constituted to store and manage the data amountstored in said initial abnormality overwrite prohibition storage areaand the full-time abnormality overwrite prohibition storage area in thenonvolatile memory.
 13. The controller of the electric power steeringapparatus according to claim 2, wherein said storage means has aplurality of overwrite prohibition storage areas.
 14. The controller ofthe electric power steering apparatus according to claim 6, wherein saidabnormality data storage means is constituted to retain the abnormalityanalysis data during a predetermined time before and after theabnormality detection in time sequence.
 15. The controller of theelectric power steering apparatus according to claim 14, wherein saidabnormality analysis data is constituted by the time sequential data ofthe detection period comprising a first predetermined time leading tothe generation of the abnormality and the time sequential data of theconfirmation period from the expiry of said detection period to thesecond predetermined time.
 16. The controller of the electric powersteering apparatus according to claim 14, wherein said initialabnormality detection means is constituted to perform any one or aplurality of the initial abnormality detection of the toque detectionmeans included in said steering assist control mechanism, the initialabnormality detection of the control means included in said steeringassist control mechanism, the initial abnormality detection of thecurrent detection means included in said steering assist controlmechanism, the initial abnormality detection of the electric motorincluded in said steering assist control mechanism, the initialabnormality detection of the power supply system and the initialabnormality detection of said memory.
 17. The controller of the electricpower steering apparatus according to claim 14, wherein said full-timeabnormality detection means is constituted to perform any one or aplurality of the full-time abnormality detection of the toque detectionmeans included in said steering assist control mechanism, the full-timeabnormality detection of the control means included in said steeringassist control mechanism, the full-time abnormality detection of thecurrent detection means included in said steering assist controlmechanism, the full-time abnormality detection of the electric motorincluded in said steering assist control mechanism, the full-timeabnormality detection of the speed detection means included in saidsteering assist control mechanism and the full-time abnormalitydetection of the power supply system.
 18. The controller of the electricpower steering apparatus according to claim 7, wherein said initialabnormality detection means is constituted to perform any one or aplurality of the initial abnormality detection of the toque detectionmeans included in said steering assist control mechanism, the initialabnormality detection of the control means included in said steeringassist control mechanism, the initial abnormality detection of thecurrent detection means included in said steering assist controlmechanism, the initial abnormality detection of the electric motorincluded in said steering assist control mechanism, the initialabnormality detection of the power supply system and the initialabnormality detection of said memory.